<script setup lang="ts">
defineOptions({
  name: "pinia",
});

const userStore = useUserStore();

onMounted(() => {
  if (userStore.someState) {
    console.log("上次访问路径:", userStore.someState);
  }
});

function clickMe() {
  userStore.updateSomeState();
}
</script>

<template>
  <div>
    pinia - {{ userStore.someState }}

    <el-button @click="clickMe">按钮</el-button>
  </div>
</template>

<style lang="scss" scoped></style>
